package com.crm.customers.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.crm.customers.dao.ContractFilesDao;
import com.crm.customers.model.ContractFiles;
import com.crm.customers.service.ContractFilesService;

@Service("contractFilesService")
public class ContractFilesServiceImpl implements ContractFilesService {
	
	@Autowired
	private ContractFilesDao contractFilesDao;

	@Override
	public ContractFiles insertContractFiles(ContractFiles cf) {
		return contractFilesDao.insert(cf);
	}

	@Override
	public List<ContractFiles> getFileIdByConid(Long Conid) {
		List<ContractFiles> list = contractFilesDao.getFileListByConid(Conid);
		return list;
	}

	@Override
	public ContractFiles getContractFilesByFileId(Long fileid) {
		return contractFilesDao.getContractFilesByFileId(fileid);
	}

	@Override
	public int updataContractFiles(ContractFiles cf) {
		return contractFilesDao.updateByPrimaryKeySelective(cf);
	}

	@Override
	public int getFileCountByConid(Long Conid) {
		return contractFilesDao.getFileCountByConid(Conid);
	}
	
	
	
	
}
